Public Class frmGLEmpTransAdd
    Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents tbDocNum As System.Windows.Forms.TextBox
    Friend WithEvents tbRefer As System.Windows.Forms.TextBox
    Friend WithEvents txtEmpCode As System.Windows.Forms.TextBox
    Friend WithEvents rbDmemo As System.Windows.Forms.RadioButton
    Friend WithEvents rbCmemo As System.Windows.Forms.RadioButton
    Friend WithEvents rbReceipt As System.Windows.Forms.RadioButton
    Friend WithEvents GroupPanel1 As DevComponents.DotNetBar.Controls.GroupPanel
    Friend WithEvents cmbEmployee As DevComponents.DotNetBar.Controls.ComboBoxEx
    Friend WithEvents cmbCompany As DevComponents.DotNetBar.Controls.ComboBoxEx
    Friend WithEvents GroupPanel2 As DevComponents.DotNetBar.Controls.GroupPanel
    Friend WithEvents LabelX4 As DevComponents.DotNetBar.LabelX
    Friend WithEvents LabelX3 As DevComponents.DotNetBar.LabelX
    Friend WithEvents LabelX2 As DevComponents.DotNetBar.LabelX
    Friend WithEvents LabelX1 As DevComponents.DotNetBar.LabelX
    Friend WithEvents cmdExit As DevComponents.DotNetBar.ButtonX
    Friend WithEvents cmdSave As DevComponents.DotNetBar.ButtonX
    Friend WithEvents lblCompany As System.Windows.Forms.Label
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.tbDocNum = New System.Windows.Forms.TextBox()
        Me.rbDmemo = New System.Windows.Forms.RadioButton()
        Me.rbCmemo = New System.Windows.Forms.RadioButton()
        Me.rbReceipt = New System.Windows.Forms.RadioButton()
        Me.tbRefer = New System.Windows.Forms.TextBox()
        Me.txtEmpCode = New System.Windows.Forms.TextBox()
        Me.lblCompany = New System.Windows.Forms.Label()
        Me.GroupPanel1 = New DevComponents.DotNetBar.Controls.GroupPanel()
        Me.cmdExit = New DevComponents.DotNetBar.ButtonX()
        Me.cmdSave = New DevComponents.DotNetBar.ButtonX()
        Me.LabelX4 = New DevComponents.DotNetBar.LabelX()
        Me.LabelX3 = New DevComponents.DotNetBar.LabelX()
        Me.LabelX2 = New DevComponents.DotNetBar.LabelX()
        Me.LabelX1 = New DevComponents.DotNetBar.LabelX()
        Me.GroupPanel2 = New DevComponents.DotNetBar.Controls.GroupPanel()
        Me.cmbCompany = New DevComponents.DotNetBar.Controls.ComboBoxEx()
        Me.cmbEmployee = New DevComponents.DotNetBar.Controls.ComboBoxEx()
        Me.GroupPanel1.SuspendLayout()
        Me.GroupPanel2.SuspendLayout()
        Me.SuspendLayout()
        '
        'tbDocNum
        '
        Me.tbDocNum.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.tbDocNum.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.tbDocNum.Location = New System.Drawing.Point(84, 122)
        Me.tbDocNum.Name = "tbDocNum"
        Me.tbDocNum.Size = New System.Drawing.Size(113, 26)
        Me.tbDocNum.TabIndex = 2
        '
        'rbDmemo
        '
        Me.rbDmemo.AutoSize = True
        Me.rbDmemo.BackColor = System.Drawing.Color.Transparent
        Me.rbDmemo.Checked = True
        Me.rbDmemo.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.rbDmemo.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.rbDmemo.Location = New System.Drawing.Point(10, 10)
        Me.rbDmemo.Name = "rbDmemo"
        Me.rbDmemo.Size = New System.Drawing.Size(103, 22)
        Me.rbDmemo.TabIndex = 42
        Me.rbDmemo.TabStop = True
        Me.rbDmemo.Text = "Debit Memo"
        Me.rbDmemo.UseVisualStyleBackColor = False
        '
        'rbCmemo
        '
        Me.rbCmemo.AutoSize = True
        Me.rbCmemo.BackColor = System.Drawing.Color.Transparent
        Me.rbCmemo.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.rbCmemo.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.rbCmemo.Location = New System.Drawing.Point(202, 10)
        Me.rbCmemo.Name = "rbCmemo"
        Me.rbCmemo.Size = New System.Drawing.Size(107, 22)
        Me.rbCmemo.TabIndex = 43
        Me.rbCmemo.Text = "Credit Memo"
        Me.rbCmemo.UseVisualStyleBackColor = False
        '
        'rbReceipt
        '
        Me.rbReceipt.AutoSize = True
        Me.rbReceipt.BackColor = System.Drawing.Color.Transparent
        Me.rbReceipt.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.rbReceipt.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.rbReceipt.Location = New System.Drawing.Point(120, 10)
        Me.rbReceipt.Name = "rbReceipt"
        Me.rbReceipt.Size = New System.Drawing.Size(73, 22)
        Me.rbReceipt.TabIndex = 44
        Me.rbReceipt.Text = "Receipt"
        Me.rbReceipt.UseVisualStyleBackColor = False
        '
        'tbRefer
        '
        Me.tbRefer.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.tbRefer.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.tbRefer.Location = New System.Drawing.Point(84, 159)
        Me.tbRefer.Name = "tbRefer"
        Me.tbRefer.Size = New System.Drawing.Size(199, 26)
        Me.tbRefer.TabIndex = 3
        '
        'txtEmpCode
        '
        Me.txtEmpCode.BackColor = System.Drawing.Color.White
        Me.txtEmpCode.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.txtEmpCode.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
        Me.txtEmpCode.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtEmpCode.Location = New System.Drawing.Point(87, 79)
        Me.txtEmpCode.Name = "txtEmpCode"
        Me.txtEmpCode.ReadOnly = True
        Me.txtEmpCode.Size = New System.Drawing.Size(112, 26)
        Me.txtEmpCode.TabIndex = 50
        '
        'lblCompany
        '
        Me.lblCompany.AutoSize = True
        Me.lblCompany.BackColor = System.Drawing.Color.Transparent
        Me.lblCompany.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblCompany.Location = New System.Drawing.Point(86, 14)
        Me.lblCompany.Name = "lblCompany"
        Me.lblCompany.Size = New System.Drawing.Size(0, 18)
        Me.lblCompany.TabIndex = 51
        '
        'GroupPanel1
        '
        Me.GroupPanel1.CanvasColor = System.Drawing.SystemColors.Control
        Me.GroupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007
        Me.GroupPanel1.Controls.Add(Me.tbRefer)
        Me.GroupPanel1.Controls.Add(Me.tbDocNum)
        Me.GroupPanel1.Controls.Add(Me.cmdExit)
        Me.GroupPanel1.Controls.Add(Me.cmdSave)
        Me.GroupPanel1.Controls.Add(Me.LabelX4)
        Me.GroupPanel1.Controls.Add(Me.LabelX3)
        Me.GroupPanel1.Controls.Add(Me.LabelX2)
        Me.GroupPanel1.Controls.Add(Me.LabelX1)
        Me.GroupPanel1.Controls.Add(Me.GroupPanel2)
        Me.GroupPanel1.Controls.Add(Me.cmbCompany)
        Me.GroupPanel1.Controls.Add(Me.cmbEmployee)
        Me.GroupPanel1.Dock = System.Windows.Forms.DockStyle.Fill
        Me.GroupPanel1.Location = New System.Drawing.Point(0, 0)
        Me.GroupPanel1.Name = "GroupPanel1"
        Me.GroupPanel1.Size = New System.Drawing.Size(446, 368)
        '
        '
        '
        Me.GroupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2
        Me.GroupPanel1.Style.BackColorGradientAngle = 90
        Me.GroupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground
        Me.GroupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid
        Me.GroupPanel1.Style.BorderBottomWidth = 1
        Me.GroupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder
        Me.GroupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid
        Me.GroupPanel1.Style.BorderLeftWidth = 1
        Me.GroupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid
        Me.GroupPanel1.Style.BorderRightWidth = 1
        Me.GroupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid
        Me.GroupPanel1.Style.BorderTopWidth = 1
        Me.GroupPanel1.Style.CornerDiameter = 4
        Me.GroupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded
        Me.GroupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center
        Me.GroupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText
        Me.GroupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near
        Me.GroupPanel1.TabIndex = 52
        Me.GroupPanel1.Text = "GL-Employee - Add"
        '
        'cmdExit
        '
        Me.cmdExit.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton
        Me.cmdExit.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.cmdExit.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(64, Byte), Integer))
        Me.cmdExit.Location = New System.Drawing.Point(320, 289)
        Me.cmdExit.Name = "cmdExit"
        Me.cmdExit.Size = New System.Drawing.Size(82, 27)
        Me.cmdExit.TabIndex = 229
        Me.cmdExit.Text = "Exit"
        '
        'cmdSave
        '
        Me.cmdSave.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton
        Me.cmdSave.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.cmdSave.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(64, Byte), Integer))
        Me.cmdSave.Location = New System.Drawing.Point(232, 290)
        Me.cmdSave.Name = "cmdSave"
        Me.cmdSave.Size = New System.Drawing.Size(82, 26)
        Me.cmdSave.TabIndex = 228
        Me.cmdSave.Text = "Save"
        '
        'LabelX4
        '
        Me.LabelX4.BackColor = System.Drawing.Color.Transparent
        Me.LabelX4.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.LabelX4.Location = New System.Drawing.Point(5, 159)
        Me.LabelX4.Name = "LabelX4"
        Me.LabelX4.Size = New System.Drawing.Size(75, 23)
        Me.LabelX4.TabIndex = 2
        Me.LabelX4.Text = "Details"
        '
        'LabelX3
        '
        Me.LabelX3.BackColor = System.Drawing.Color.Transparent
        Me.LabelX3.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.LabelX3.Location = New System.Drawing.Point(5, 55)
        Me.LabelX3.Name = "LabelX3"
        Me.LabelX3.Size = New System.Drawing.Size(75, 43)
        Me.LabelX3.TabIndex = 2
        Me.LabelX3.Text = "Employee" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "Details"
        '
        'LabelX2
        '
        Me.LabelX2.BackColor = System.Drawing.Color.Transparent
        Me.LabelX2.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.LabelX2.Location = New System.Drawing.Point(5, 122)
        Me.LabelX2.Name = "LabelX2"
        Me.LabelX2.Size = New System.Drawing.Size(63, 23)
        Me.LabelX2.TabIndex = 2
        Me.LabelX2.Text = "Doc No"
        '
        'LabelX1
        '
        Me.LabelX1.BackColor = System.Drawing.Color.Transparent
        Me.LabelX1.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.LabelX1.Location = New System.Drawing.Point(5, 19)
        Me.LabelX1.Name = "LabelX1"
        Me.LabelX1.Size = New System.Drawing.Size(75, 23)
        Me.LabelX1.TabIndex = 2
        Me.LabelX1.Text = "Company"
        '
        'GroupPanel2
        '
        Me.GroupPanel2.CanvasColor = System.Drawing.SystemColors.Control
        Me.GroupPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007
        Me.GroupPanel2.Controls.Add(Me.rbDmemo)
        Me.GroupPanel2.Controls.Add(Me.rbCmemo)
        Me.GroupPanel2.Controls.Add(Me.rbReceipt)
        Me.GroupPanel2.Location = New System.Drawing.Point(84, 200)
        Me.GroupPanel2.Name = "GroupPanel2"
        Me.GroupPanel2.Size = New System.Drawing.Size(318, 71)
        '
        '
        '
        Me.GroupPanel2.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2
        Me.GroupPanel2.Style.BackColorGradientAngle = 90
        Me.GroupPanel2.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground
        Me.GroupPanel2.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid
        Me.GroupPanel2.Style.BorderBottomWidth = 1
        Me.GroupPanel2.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder
        Me.GroupPanel2.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid
        Me.GroupPanel2.Style.BorderLeftWidth = 1
        Me.GroupPanel2.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid
        Me.GroupPanel2.Style.BorderRightWidth = 1
        Me.GroupPanel2.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid
        Me.GroupPanel2.Style.BorderTopWidth = 1
        Me.GroupPanel2.Style.CornerDiameter = 4
        Me.GroupPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded
        Me.GroupPanel2.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center
        Me.GroupPanel2.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText
        Me.GroupPanel2.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near
        Me.GroupPanel2.TabIndex = 1
        Me.GroupPanel2.Text = "Document Type"
        '
        'cmbCompany
        '
        Me.cmbCompany.DisplayMember = "Text"
        Me.cmbCompany.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.cmbCompany.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbCompany.ItemHeight = 19
        Me.cmbCompany.Location = New System.Drawing.Point(85, 19)
        Me.cmbCompany.Name = "cmbCompany"
        Me.cmbCompany.Size = New System.Drawing.Size(241, 25)
        Me.cmbCompany.TabIndex = 0
        '
        'cmbEmployee
        '
        Me.cmbEmployee.DisplayMember = "Text"
        Me.cmbEmployee.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.cmbEmployee.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbEmployee.ItemHeight = 19
        Me.cmbEmployee.Location = New System.Drawing.Point(85, 84)
        Me.cmbEmployee.Name = "cmbEmployee"
        Me.cmbEmployee.Size = New System.Drawing.Size(317, 25)
        Me.cmbEmployee.TabIndex = 0
        '
        'frmGLEmpTransAdd
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(7, 19)
        Me.BackColor = System.Drawing.SystemColors.ActiveCaption
        Me.ClientSize = New System.Drawing.Size(446, 368)
        Me.ControlBox = False
        Me.Controls.Add(Me.txtEmpCode)
        Me.Controls.Add(Me.lblCompany)
        Me.Controls.Add(Me.GroupPanel1)
        Me.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.ForeColor = System.Drawing.SystemColors.ControlLightLight
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "frmGLEmpTransAdd"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.GroupPanel1.ResumeLayout(False)
        Me.GroupPanel1.PerformLayout()
        Me.GroupPanel2.ResumeLayout(False)
        Me.GroupPanel2.PerformLayout()
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub

#End Region
    Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click

        If ValidateInputData() = True Then
            GlEmpID = cmbEmployee.SelectedValue
            GlEmpName = "A/R:" & cmbEmployee.Text
            GlEmpDocNum = tbDocNum.Text


            If rbDmemo.Checked = True Then
                GlEmpDocType = "D"
            End If
            If rbCmemo.Checked = True Then
                GlEmpDocType = "C"
            End If

            If rbReceipt.Checked = True Then
                GlEmpDocType = "R"
            End If
            GlEmpDocRefer = tbRefer.Text
            Me.Close()
        End If
    End Sub

    Private Sub cmdExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdExit.Click
        If ValidateInputData() = True Then
            GlEmpID = cmbEmployee.SelectedValue
            GlEmpDocNum = tbDocNum.Text
            GlEmpName = "A/R:" & cmbEmployee.Text
            If rbDmemo.Checked = True Then
                GlEmpDocType = "D"
            End If
            If rbCmemo.Checked = True Then
                GlEmpDocType = "C"
            End If
            If rbReceipt.Checked = True Then
                GlEmpDocType = "R"
            End If
            GlEmpDocRefer = tbRefer.Text
            Me.Close()
        End If
    End Sub

    Sub ToLoadEmployee(ByVal CompanyId As Integer)

        Dim ICdata As New ICdataLogic
        Dim ds2 As DataSet
        ds2 = ICdata.GetCompanyEmployees(CompanyId)
        cmbEmployee.DataSource = ds2.Tables(0)
        cmbEmployee.ValueMember = "EmpId"
        cmbEmployee.DisplayMember = "EmpName"

    End Sub
    Private Sub ARgroupsAdd_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim ICdata As New ICdataLogic
        Dim ds2 As DataSet

        ds2 = ICdata.GetAllCompany()
        cmbCompany.DataSource = ds2.Tables(0)
        cmbCompany.ValueMember = "CompanyID"
        cmbCompany.DisplayMember = "CompanyName"

        Call ToLoadEmployee(cmbCompany.SelectedValue)

        If IsNumeric(GlEmpID) Then
            If GlEmpID > 0 Then
                cmbEmployee.SelectedValue = GlEmpID
                Dim EmpCode As String
                EmpCode = ICdata.GetEmployeeCode(cmbEmployee.SelectedValue)
                txtEmpCode.Text = EmpCode
                tbDocNum.Text = GlEmpDocNum

                If GlEmpDocType = "R" Then
                    rbReceipt.Checked = True
                End If
                If GlEmpDocType = "D" Then
                    rbDmemo.Checked = True
                End If
                If GlEmpDocType = "C" Then
                    rbCmemo.Checked = True
                End If
                tbRefer.Text = GlEmpDocRefer
            End If
        End If

    End Sub
    Private Function ValidateInputData() As Boolean
        If Not IsNumeric(cmbEmployee.SelectedValue) Then
            MsgBox("Select an Employee", MsgBoxStyle.Critical, "Inventory Manager")
            cmbEmployee.Focus()
            Return False
        End If
        Return True
    End Function
    Private Sub cmbEmployee_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs)
        AutoCompleteCombo_KeyUp(cmbEmployee, e)
        If e.KeyCode = Keys.Enter Then
            SendKeys.Send("{Tab}")
        End If
    End Sub
    Private Sub cmbEmployee_Leave(ByVal sender As Object, ByVal e As System.EventArgs)
        AutoCompleteCombo_Leave(cmbEmployee)
    End Sub

    Private Sub cmbEmployee_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbEmployee.SelectedIndexChanged, cmbCompany.SelectedIndexChanged
        If IsNumeric(cmbEmployee.SelectedValue) Then
            Dim icdata As New ICdataLogic
            Dim EmpCode As String
            EmpCode = icdata.GetEmployeeCode(cmbEmployee.SelectedValue)
            If EmpCode.Trim = "" Then
                MsgBox("Invalid Employee!", MsgBoxStyle.Critical, "Inventory Manager")
                txtEmpCode.Clear()
            Else
                txtEmpCode.Text = EmpCode
            End If
        End If
    End Sub

    Private Sub cmbCompany_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbCompany.SelectedIndexChanged
        If IsNumeric(cmbCompany.SelectedValue) Then
            Call ToLoadEmployee(cmbCompany.SelectedValue)
        End If
    End Sub
End Class
